package com.ele.Servlet;

import com.ele.Service.ShopService;
import com.ele.Service.impl.ShopServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/shopAudit")
public class ShopAuditServlet extends HttpServlet {
    //Service
    private ShopService shopService = new ShopServiceImpl();

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        String shopId = req.getParameter("shopId");
        String status = req.getParameter("status");
        Integer x = shopService.changeStatus(shopId,status);
        resp.getWriter().write(""+x);
    }

}
